;**************************************************************
;	
;	This an simple test of  led for S3C2440
;	Hope it is useful to you.
;		 app :		 		asm_led_boot
;
;	   Board:				akae2440
;    environment:	bootloader & ADS
;    Author:			xingwenpeng
;    Date:				2009-7-20
;    web:					www.akaedu.org
;	
;		 CPLD_LED		physical address is	0x20800000
;
;**************************************************************	

	AREA    Init, CODE, READONLY
	
	ENTRY

start
;**************************************
; 1.disabble Watch dog                *
;**************************************	

disabble_watch_dog
	mov r1,#0x53000000
	mov r2,#0x0
	str r2,[r1]


;**************************************
; 2.led_test                          *
;**************************************	

led_test
	ldr r0, =0x20800000
	mov r1, #0xff
	strb r1, [r0]

	ldr r0 ,=0xffff
delay0
	sub r0,r0,#1
	cmp r0,#0
	bne delay0
	
	ldr r0, =0x20800000
	mov r1, #0x0
	strb r1, [r0]

	ldr r0 ,=0xffff
delay1
	sub r0,r0,#1
	cmp r0,#0
	bne delay1
	
	b led_test

	end